package com.iplant.aps.service.mesenum;

/**
 * 盘点记录类型
 *
 * @author YouWang·Peng
 * @CreateTime 2022-5-12 15:20:16
 */
public enum WMSInventoryCheckType {
	/**
	 * SCH
	 */
	Default(0, "默认"),
	/**
	 * 盘盈
	 */
	InventorySurplus(1, "盘盈"),
	/**
	 * 异常关闭
	 */
	InventoryLoss(2, "盘亏");

	private int value;
	private String lable;

	private WMSInventoryCheckType(int value, String lable) {
		this.value = value;
		this.lable = lable;
	}

	/**
	 * 通过 value 的数值获取枚举实例
	 *
	 * @param val
	 * @return
	 */
	public static WMSInventoryCheckType getEnumType(int val) {
		for (WMSInventoryCheckType type : WMSInventoryCheckType.values()) {
			if (type.getValue() == val) {
				return type;
			}
		}
		return Default;
	}

	public int getValue() {
		return value;
	}

	public String getLable() {
		return lable;
	}
}
